<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>  
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>>"> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $(".click").click(function(){
  $(".tip").fadeIn(200);
  });
  
  $(".tiptop a").click(function(){
  $(".tip").fadeOut(200);
});

  $(".sure").click(function(){
  $(".tip").fadeOut(100);
});

  $(".cancel").click(function(){
  $(".tip").fadeOut(100);
});

});

	function del(id){
		if(confirm("你确认删除吗？")){
			location.href="back/RoomServlet?task=delete&id="+id;
		}
	}
</script>
</head>
<body>
		
    
    <div class="rightinfo">
    
     <div class="tools" >
    
    	 <div class="formtitle"><span>客房信息</span>
    	   <ul class="toolbar1">
        <li ><a  style="margin-right:105px" href="test/addroom" ><span style="margin-right:10px; margin-bottom:3px; border-bottom:none;"><img src="img/t01.png" style="margin-bottom:-6px" />添加房间</span></a></li>
        </ul>
      
    	 </div>
        
         
      
    
    </div>
    
    
    <table class="tablelist">
    	<thead>
    	
    	<tr>
        
       
        <th>序号<i class="sort"><img src="img/px.gif" /></i></th>
         <th>房间号</th>
        <th>房间类型</th>
        <th>房间楼层</th>
        <th>价格</th>
        <th>可入住人数</th>
        <th>已入住人数</th>
      	<th>操作</th>
      	
        </tr>
        </thead>
        <tbody>
        
        <c:forEach var="rt" items="${list }">
        <tr>
      
         <td>${rt.id }</td>
        <td>${rt.roomid }</td>
        <td>${rt.roomtype }</td>
        <td>${rt.floor }</td>
        <td>${rt.price }</td>
        <td>${rt.clps }</td>
        <td>${rt.cips }</td>
        <td><a href="back/RoomServlet?task=queryForUpdate&id=${rt.id }" class="tablelink">修改</a>
         <a href="javascript:del(${rt.id });" class="tablelink"> 删除</a></td>
        </tr>
     	</c:forEach>
          
          
        </tbody>
    </table>
    
   
  
    
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="img/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    
    
    
    
    </div>
    
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>

<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>